import request from '../utils/request';


/**
 * 获取所有类型,包括条件查询接口
 * @param query
 * @returns {AxiosPromise}
 */
export const getCategroyList = query =>{
    return request({
        url:'/common/categroy/getCategroyList',
        method:'get',
        params:query
    })
};

/**
 * 获取单个类型
 * @param query
 * @returns {AxiosPromise}
 */
export const getCategroyInfo = query =>{
    return request({
        url:'/common/categroy/getCategroyInfo',
        method:'get',
        params:query
    })
};

/**
 * 保存类型接口
 * @param data
 * @returns {AxiosPromise}
 */
export const saveCategroyInfo = data =>{
    return request({
        url:'/common/categroy/saveCategroyInfo',
        method:'post',
        data
    })
};
/**
 * 更新类型接口
 * @param data
 * @returns {AxiosPromise}
 */
export const updateCategroyInfo = data =>{
    return request({
        url:'/common/categroy/updateCategroyInfo',
        method:'put',
        data
    })
};
/**
 *根据id删除类型接口
 * @param id
 * @returns {AxiosPromise}
 */
export const delCategroyInfo = id =>{
    return request({
        url:'/common/categroy/delCategroyInfo',
        method:'delete',
        params:{id:id}
    })
};
/**
 * 根据id集合批量删除类型接口
 * @param id
 * @returns {AxiosPromise}
 */
export const delBatchCategroyInfo = id =>{
    return request({
        url:'/common/categroy/delBatchCategroyInfo',
        method:'delete',
        params:{idList:id}
    })
};



